import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [uni()],
  // 配置 Vite 的构建选项
  build: {
    // 压缩代码
    minify: true,

    // 关闭 sourcemap
    sourcemap: false,

    // 关闭警告信息
    terserOptions: {
      compress: {
        warnings: false,
        drop_console: true,
        drop_debugger: true,
        pure_funcs: ['console.log']
      }
    }
  }

});
